﻿<div class="top-row pl-4 navbar navbar-dark">
    <a class="navbar-brand" href="">Blazor Sample</a>
    <button class="navbar-toggler" @onclick="ToggleNavMenu">
        <span class="navbar-toggler-icon"></span>
    </button>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
    <ul class="nav flex-column">
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="BlazorRoute">
                <span class="oi oi-plus" aria-hidden="true"></span> Blazor Route
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="DifferentBlazorRoute">
                <span class="oi oi-plus" aria-hidden="true"></span> Different Blazor Route
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="ParentComponent">
                <span class="oi oi-plus" aria-hidden="true"></span> Parent-child Example
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="RouteParameter">
                <span class="oi oi-plus" aria-hidden="true"></span> Route Parameter
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="TemplatedComponents">
                <span class="oi oi-plus" aria-hidden="true"></span> Templated Components
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="CascadingValuesParametersTheme">
                <span class="oi oi-plus" aria-hidden="true"></span> Cascading &ndash; Theme
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="CascadingValuesParametersTabSet">
                <span class="oi oi-plus" aria-hidden="true"></span> Cascading &ndash; TabSet
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="RazorTemplates">
                <span class="oi oi-plus" aria-hidden="true"></span> Razor Templates
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="JSInterop">
                <span class="oi oi-plus" aria-hidden="true"></span> JavaScript Interop
            </NavLink>
        </li>
    </ul>
</div>

@code {
    private bool collapseNavMenu = true;

    private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}
